-- GENERATED SPELL FOR [Aggonis] --


function spell0_17000(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(21068,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17000', 26000, 1)
end

function spell1_17000(pUnit, Event) --@Fear,n/a--
pUnit:FullCastSpellOnTarget(22678,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17000', 7500, 1)
end

function Sorts_17000(pUnit, Event)
local choix_sorts_17000 = math.random(0, 1)
if choix_sorts_17000 == 0 then
pUnit:RegisterEvent('spell0_17000', 1, 1)
end
if choix_sorts_17000 == 1 then
pUnit:RegisterEvent('spell1_17000', 1, 1)
end
end

function mob17000_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17000', math.random(1500, 3000), 1)
end

function mob17000_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17000_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17000_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17000, 1, 'mob17000_Action')
RegisterUnitEvent(17000, 2, 'mob17000_Leave')
RegisterUnitEvent(17000, 3, 'mob17000_Kill')
RegisterUnitEvent(17000, 4, 'mob17000_Die')
